import request from '@/utils/request'

// 查询笔试信息列表
export function listExam(query: any) {
  return request({
    url: '/system/exam/list',
    method: 'get',
    params: query
  })
}

// 查询笔试信息详细
export function getExam(examId:any) {
  return request({
    url: '/system/exam/' + examId,
    method: 'get'
  })
}

// 新增笔试信息
export function addExam(data:any) {
  return request({
    url: '/system/exam',
    method: 'post',
    data: data
  })
}

// 修改笔试信息
export function updateExam(data:any) {
  return request({
    url: '/system/exam',
    method: 'put',
    data: data
  })
}

// 删除笔试信息
export function delExam(examId:any) {
  return request({
    url: '/system/exam/' + examId,
    method: 'delete'
  })
}

//excel文件导出
export function exportExam(data:any) {
  return request({
    url: '/system/exam/export',
    method: 'post',
    data: data,
    responseType: 'blob'
  })
}
